Conventionally, a rotary encoder has been used for detecting the rotational angle of a rotor or a rotating member to be measured. A prior art rotary encoder generally used is provided with a rotating disc having optical patterns formed thereon and with an optical sensor disposed in the vicinity of the rotating disc for reading the optical patterns. When a rotational angle of the rotating member is desired to be detected in the form of an absolute value, optical patterns are provided on the rotating disc in the form of a digital code indicative of an absolute angle or corresponding to the angle.